x86: consistently serialize CMOS/RTC accesses on rtc_lock
authorJan Beulich <jbeulich@novell.com>
Tue, 19 Jul 2011 13:10:53 +0000 (14:10 +0100)
committerJan Beulich <jbeulich@novell.com>
Tue, 19 Jul 2011 13:10:53 +0000 (14:10 +0100)
commit876895c30294a8caead2386dcb7d17af88ed7cfd
tree4b6d42f576de3c67bdecb94276f718387badb0de
parente4c3755d4dd746511a87b9f7da7199fcd3ee0333
x86: consistently serialize CMOS/RTC accesses on rtc_lock

Since RTC/CMOS accesses aren't atomic, there are possible races
between code paths setting the index register and subsequently
reading/writing the data register. This is supposed to be dealt with
by acquiring rtc_lock, but two places up to now lacked respective
synchronization: Accesses to the EFI time functions and
smpboot_{setup,restore}_warm_reset_vector().

This in turn requires no longer directly passing through guest writes
to the index register, but instead using a machanism similar to that
for PCI config space method 1 accesses.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/efi/runtime.c
xen/arch/x86/hpet.c
xen/arch/x86/traps.c
xen/include/asm-x86/domain.h
xen/include/asm-x86/hpet.h
xen/include/asm-x86/mach-default/smpboot_hooks.h